#ifndef DBCONNECTOR_H
#define DBCONNECTOR_H
#include<QSqlDatabase>
#include<QSqlQuery>
#include<string>

class DBConnector
{
private:
    QSqlDatabase  sqldb;

public:
    DBConnector();
    ~DBConnector();
public:
    bool connect(const std::string  &dbName);
    bool close();
    bool checkConn();
    std::string getValue(const std::string  &key );
    bool setValue(const std::string  &key,const std::string & value);
    bool ifExit(const std::string & key);
};


#endif // DBCONNECTOR_H
